package cn.wolfcode.mapper;


import cn.wolfcode.domain.User;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface UserMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(User record);

    User selectByPrimaryKey(Integer id);

    List<User> selectAll();

    int updateByPrimaryKey(User record);

    User selectUserByName(String username);

    User checkName(String username);

    void register(@Param("username") String username, @Param("password") String password);

    void updateKey(@Param("id") Long id, @Param("newPassword") String newPassword);
}